package secretaryGUI;

import secretary.defineSemester;
import flexibility.userData;
import guiCode.secretaryScreenCode;
import basic.ClientConsole;

import com.sun.rowset.CachedRowSetImpl;

public class viewAssignedClasses {
	
	private secretaryScreenCode ssc;
	private userData viewAssigned = new userData();
	private updateUpperTableEntries UUTE = new updateUpperTableEntries();
	private defineSemester ds = new defineSemester();
	private int semesterReal;
	//this will update the upper table with the classes that are assigned to courses
	
	public void viewAssignedClasses(ClientConsole secretaryConnection,CachedRowSetImpl crs, createSecretaryWindow csw, secretaryScreenCode code){
		ssc = code;
		
		viewAssigned.deleteAll();
		viewAssigned.addData(247);
		viewAssigned.addData(1);
		semesterReal = ds.identify(ssc.getSemesterForEdit(), secretaryConnection, crs);
		viewAssigned.addData(semesterReal);
		viewAssigned.addData(semesterReal);
		secretaryConnection.acceptMsg(viewAssigned);
		crs = secretaryConnection.getResults();
		
		UUTE.update(csw, crs);
	}

}
